﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Basket.ascx.cs" Inherits="Controls_Basket" %>

<div class="contentContainer page_un" style="padding-top:20px;">
                   
                    <div class="contentPadd un">
                        <div class="prods_content prods_table">
                        
  <form id="form1" runat="server">
    <div>
     <asp:GridView ID="GridView1" runat="server"  
                            AutoGenerateColumns="False" CellPadding="0" Width="100%" 
                            OnRowCommand="GridView1_RowCommand" 
                            DataSourceID="ObjectDataSource1"
                            style="font-size: 12px" BorderColor="#CCCCCC" 
         BorderStyle="Solid" BorderWidth="3px" >
                            <FooterStyle BackColor="#FFCCCC" Font-Bold="True" ForeColor="White" />
                            <RowStyle BackColor="#EFF3FB" />
                            <EditRowStyle BackColor="#2461BF" />
                            <SelectedRowStyle BackColor="#CCCCFF" Font-Bold="True" ForeColor="#333333" />
                            <Columns>
                                <asp:BoundField DataField="OrderProductID" HeaderText="ID" ReadOnly="True" 
                                    SortExpression="OrderProductID" >
                                    <FooterStyle Width="50px" />
                                    <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:BoundField DataField="ProName" HeaderText="Tên SP" ReadOnly="True" 
                                    SortExpression="ProName" >
                                    <ControlStyle BackColor="#F4F4F4" BorderColor="#F4F4F4" />
                                    <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Price" HeaderText="Giá" HtmlEncode="False" 
                                    ReadOnly="True" SortExpression="Price" >
                                    <ControlStyle BackColor="#F4F4F4" />
                                    <FooterStyle Width="50px" />
                                    <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Summary" HeaderText="Thành Tiền" ReadOnly="True" 
                                    SortExpression="Summary" >
                                    <ControlStyle BackColor="#F4F4F4" />
                                    <FooterStyle Width="50px" />
                                    <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:ButtonField ButtonType="Image" CommandName="Delete" HeaderText="Xóa" 
                                    ImageUrl="~/images/drop-no.gif" Text="Xóa" >
                                    <ControlStyle BackColor="#F4F4F4" Height="16px" Width="16px" />
                                    <FooterStyle Width="30px" />
                                    <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:ButtonField>
                                <asp:ButtonField ButtonType="Image" CommandName="Edit" HeaderText="Sửa" 
                                    ImageUrl="~/images/edit.PNG" Text="Sửa" >
                                    <ControlStyle BackColor="#F4F4F4" Height="16px" Width="16px" />
                                    <FooterStyle Width="30px" />
                                    <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:ButtonField>
                                <asp:TemplateField HeaderText="Số Lượng" SortExpression="Amount">
                                 <ItemTemplate>
                                    <asp:TextBox  ID="soluong" runat="server" Text='<%# Eval("Amount") %>' Width ="20"></asp:TextBox>
                                </ItemTemplate>
                                    <ControlStyle BackColor="#F4F4F4" />
                                    <FooterStyle Width="30px" />
                                    <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Hình">
                                     <ItemTemplate>
                                <a href='ProductDetail.aspx?Product_Id=<%# Eval("OrderProductID") %>'>
                                        <img style="text-align:center" src='Images/Product/<%# Eval("Image") %>' width="50" height ="50" alt='<%# Eval("ProName") %>'/>
                                    </a>
                                </ItemTemplate>
                                     <ControlStyle BackColor="#F4F4F4" />
                                     <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                                <ItemStyle Width="20%" HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:TemplateField>
                            </Columns>
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        
                        </asp:GridView>
                        </div>

                        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                            DataObjectTypeName="OrderProduct" DeleteMethod="DeleteProductFromBasket" 
                            InsertMethod="InsertProductIntoTable" SelectMethod="ListProduct" 
                            TypeName="ManageBasket" UpdateMethod="UpdateProductFromBasket">
                        </asp:ObjectDataSource>
                   
                        <div style="text-align:center; padding-top:20px;">
                            <asp:Button ID="continue" runat="server" Text="Mua tiếp"  Height="30px" 
                                onclick="continue_Click" Width="142px" /> &nbsp&nbsp&nbsp&nbsp
                            <asp:Button ID="Payment" runat="server" onclick="Payment_Click" 
                                Text="Thanh toán" Width="119px" Height="30px" />
                        </div>
                      
          
           
           </form>
        </div>
    </div>
</div>
